AC_INIT(libmy_thai_utils, 0.1)

AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_CONFIG_SRCDIR(my_thai_utils.cpp)
AM_INIT_AUTOMAKE

AC_PROG_LIBTOOL
AC_PROG_CXX
AC_DISABLE_STATIC
AC_TYPE_INT32_T
LT_INIT

## check for mysql_config
AC_PATH_PROG(mysql_config, mysql_config, no)
if test "$mysql_config" = "no"; then
	AC_MSG_ERROR([Cannot find mysql_config. MySQL library is needed.])
fi
MYSQL_CFLAGS=`$mysql_config --cflags`
AC_SUBST([MYSQL_CFLAGS])

# check for icu-config
AC_PATH_PROG(icu_config, icu-config, no)
if test "$icu_config" = "no"; then
   AC_MSG_ERROR([Cannot find icu-config. ICU library is needed.])
fi
ICU_CPPFLAGS=`$icu_config --cppflags`
AC_SUBST([ICU_CPPFLAGS])
ICU_CXXFLAGS=`$icu_config --cxxflags`
AC_SUBST([ICU_CXXFLAGS])
ICU_LDFLAGS=`$icu_config --ldflags`
AC_SUBST([ICU_LDFLAGS])

AC_OUTPUT(Makefile)

